<?php
session_start();
//定义个常量，用来授权调用includes里面的文件
define('IN_TG',true);
define('IN_JS',"opener");
//定义个常量，用来指定本页的内容
define('SCRIPT','face');
//引入公共文件
require dirname(__FILE__).'/includes/common.inc.php';
require('includes/title.inc.php');
$face_list=array();
$dir=scandir("./face");
foreach ($dir as $file_name)
{
	//过滤$file_name为.和..的情况
	if($file_name!='.' && $file_name!='..')
	{
		//判断当前$path.'/'.$file_name是否是目录
		if(is_file("./face/".$file_name))
		{
			//如果是文件，则进行递归，返回数组结果，设置数组的键欸目录名
			$face_list[]="face/".$file_name;
		}
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>瓢城Web俱乐部多用户留言系统 </title>
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="styles/1/basic.css" />
<link rel="stylesheet" type="text/css" href="styles/1/face.css" />
<script type="text/javascript" src="js/opener.js"></script>
</head>
<body>
<div id="face">
	<h3>选择头像</h3>
	<dl>
        <?php foreach ($face_list as $key => $value): ?>
			<dd><img src="<?php echo $value;?>" alt="<?php echo $value;?>" title="头像<?php echo $key+1;?>" /></dd>
        <?php endforeach; ?>
	</dl>
</div>
</body>
</html>